/*  1:   */ package org.jetbrains.jps.model.library.impl;
/*  2:   */ 
/*  3:   */

import org.jetbrains.annotations.NotNull;
import org.jetbrains.jps.model.JpsCompositeElement;
import org.jetbrains.jps.model.JpsElementReference;
import org.jetbrains.jps.model.JpsModel;
import org.jetbrains.jps.model.impl.JpsNamedElementReferenceImpl;
import org.jetbrains.jps.model.library.JpsLibrary;
import org.jetbrains.jps.model.library.JpsLibraryReference;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */ 
/* 11:   */ public class JpsLibraryReferenceImpl
/* 12:   */   extends JpsNamedElementReferenceImpl<JpsLibrary, JpsLibraryReferenceImpl>
/* 13:   */   implements JpsLibraryReference
/* 14:   */ {
/* 15:   */   public JpsLibraryReferenceImpl(String paramString, JpsElementReference<? extends JpsCompositeElement> paramJpsElementReference)
/* 16:   */   {
/* 17:31 */     super(JpsLibraryRole.LIBRARIES_COLLECTION_ROLE, paramString, paramJpsElementReference);
/* 18:   */   }
/* 19:   */   
/* 20:   */   private JpsLibraryReferenceImpl(JpsLibraryReferenceImpl paramJpsLibraryReferenceImpl)
/* 21:   */   {
/* 22:35 */     super(paramJpsLibraryReferenceImpl);
/* 23:   */   }
/* 24:   */   
/* 25:   */   @NotNull
/* 26:   */   public String getLibraryName()
/* 27:   */   {
/* 28:41 */     String tmp4_1 = this.myElementName;
/* 29:41 */     if (tmp4_1 == null) {
/* 30:41 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/library/impl/JpsLibraryReferenceImpl", "getLibraryName" }));
/* 31:   */     }
/* 32:41 */     return tmp4_1;
/* 33:   */   }
/* 34:   */   
/* 35:   */   @NotNull
/* 36:   */   public JpsLibraryReferenceImpl createCopy()
/* 37:   */   {
/* 38:47 */     void tmp8_5 = new JpsLibraryReferenceImpl(this);
/* 39:47 */     if (tmp8_5 == null) {
/* 40:47 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/library/impl/JpsLibraryReferenceImpl", "createCopy" }));
/* 41:   */     }
/* 42:47 */     return tmp8_5;
/* 43:   */   }
/* 44:   */   
/* 45:   */   public JpsLibraryReference asExternal(@NotNull JpsModel paramJpsModel)
/* 46:   */   {
/* 47:52 */     if (paramJpsModel == null) {
/* 48:52 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/library/impl/JpsLibraryReferenceImpl", "asExternal" }));
/* 49:   */     }
/* 50:52 */     paramJpsModel.registerExternalReference(this);
/* 51:53 */     return this;
/* 52:   */   }
/* 53:   */   
/* 54:   */   public String toString()
/* 55:   */   {
/* 56:58 */     return "lib ref: '" + this.myElementName + "' in " + getParentReference();
/* 57:   */   }
/* 58:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.jps.model.library.impl.JpsLibraryReferenceImpl

 * JD-Core Version:    0.7.0.1

 */